﻿// ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
#include <windows.h>
#include <vector>
#include "NtfsStructs.h"
#include "NtfsParse.h"

int main()
{
	//获取所有分区 
	std::vector<DriveInfo> vecDrives;
	int iDriNums = NtfsParse::GetInstance()->GetDrives(vecDrives);
	if (iDriNums <= 0)
	{
		return RET_EEFAULT_ERROR;
	}
	
#if 1
	//test：只分析e盘
	int iTest = 0;
	std::vector<FileInfo> vecFileList;
	for (auto &wstrDrive : vecDrives)
	{
		if (iTest == 2)
		{
			
			if (RET_EEFAULT_ERROR == NtfsParse::GetInstance()->GetFileList(wstrDrive.m_wsName, vecFileList))
			{
				return RET_EEFAULT_ERROR;
			}
		}

		++iTest;
	}
#else
	for (auto &wstrDrive : vecDrives)
	{
		//根据盘符分别递归获取相关文件
		std::vector<FileInfo> vecFileList;
		if (RET_EEFAULT_ERROR == NtfsParse::GetInstance()->GetFileList(wstrDrive.m_wsName, vecFileList))
		{
			return RET_EEFAULT_ERROR;
		}
	}
#endif
	while (1);
}

